package com.example.decodertest.view.decoder

import android.media.MediaCodec
import java.nio.ByteBuffer

/**
 * 帧数据
 */
class Frame {

    var buffer: ByteBuffer? = null

    var bufferInfo = MediaCodec.BufferInfo()
        private  set

    fun  setBufferInfo(bufferInfo: MediaCodec.BufferInfo) {
        this.bufferInfo.set(bufferInfo.offset, bufferInfo.size, bufferInfo.presentationTimeUs, bufferInfo.flags)
    }
}